package dao;

import org.springframework.stereotype.Component;

import support.GridResult;
import dao.support.sql.SqlObject;

@Component
public class LossDao extends BaseDao {
	public String loss_query(SqlObject so)
	{
		Object obj = this.querySQLRead(so.getSqlCount()).get(0).get("c");
		int total = Integer.parseInt(obj.toString());
		return new GridResult(so.getPage(), (total-1)/so.getRows()+1, total, this.querySQLRead(so.getSqlRows())).toString();
	}
}
